﻿<ListBoxItem x:Class="Nizm0.QOT.Library.Controls.ProcedureListObject"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:local="clr-namespace:ThreadingComponent"
             xmlns:local2="clr-namespace:DesignInControl"
             xmlns:my="clr-namespace:Nizm0.QOT.Library.Controls"
             xmlns:obj="clr-namespace:Nizm0.QOT.Library.Objects"
             mc:Ignorable="d"  Loaded="UserControl_Loaded" >
    <ListBoxItem.Resources></ListBoxItem.Resources>
    <Grid  ContextMenu="{Binding}" Height="auto">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="16" />
            <ColumnDefinition Width="auto" MaxWidth="22" />
            <ColumnDefinition Width="auto" />
            <ColumnDefinition Width="auto" />
            <ColumnDefinition Width="22" />
        </Grid.ColumnDefinitions>
        <Expander Name="expand" Grid.Column="0" Grid.ColumnSpan="5" Visibility="Visible"  HorizontalAlignment="Stretch" FlowDirection="RightToLeft" MinHeight="18" SizeChanged="expand_SizeChanged">
            <Expander.Content>
                <Grid FlowDirection="LeftToRight" DataContext="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType=my:ProcedureListObject, AncestorLevel=1}}">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="5"/>
                        <ColumnDefinition Width="auto"/>
                    </Grid.ColumnDefinitions>
                    <DataGrid ItemsSource="{Binding Procedure.KnownVersionList}" >
                        <DataGrid.Columns>
                            <DataGridTextColumn Header="Version" Binding="{Binding}"/>
                        </DataGrid.Columns>
                    </DataGrid>
                </Grid>
            </Expander.Content>
        </Expander>
        <local:CircularProgressBar Grid.Column="0" Grid.Row="0" Margin="0,0,0,-65" Padding="0,0,0,-40" HorizontalAlignment="Left" VerticalAlignment="Stretch" Visibility="Hidden" x:Name="Progress" Height="18" />
        <Image Name="image"  Grid.Column="1" MaxHeight="22" MaxWidth="22" Visibility="Hidden" />
        <TextBlock Grid.Column="2" Grid.Row="0" Margin="0,4,0,0" Name="text" Text="TextBlock" Height="14" HorizontalAlignment="Stretch" VerticalAlignment="Top" />
        <Label Grid.Column="3" Grid.Row="0" Name="counter" Height="14" DockPanel.Dock="Right" Visibility="Visible" Margin="5,5,0,0" HorizontalAlignment="Left" VerticalAlignment="Top" Padding="0" />
        <CheckBox Grid.Column="0" Grid.Row="0" Height="16" HorizontalAlignment="Left" Margin="2,6,0,0" Name="checkBox_looking" VerticalAlignment="Top" Checked="checkBox_looking_Checked" Unchecked="checkBox_looking_Checked"/>
    </Grid>
</ListBoxItem>